//app.js
wx.cloud.init();
const db = wx.cloud.database();
//获取数据库操作命令
const command = db.command;
App({
  onLaunch: function () {},
  //跳转商品详情页，通过商品id:prop当前点击对象
  goDetail(prop) {
    let id = prop.currentTarget.dataset.id;
    wx.navigateTo({
      url: `/pages/detail/detail?id=${id}`,
    });
  },
});
